<%= javascript_include_tag 'routes' %>

<div id="content">
	<div id="top">
		<h3>New Route</h3>
		<%= render :partial => '/partials/help_link', :locals => {:path => {:controller => "help", :action => "routes", :anchor => "new"}} %>
	</div>
	<div class="edit">
		<% form_for @route do |f| %>
			<%= f.error_messages %>
			<div class="edit-table">
				<div class="edit-row">
					<div class="left">
						<%= f.label :name, "Route Name" %><span class="required">required</span>
						<p>Pick a route name.</p>
					</div>
					<div class="right">
						<div class="single">
							<%= f.text_field :name %>
						</div>
					</div>
				</div>
				<div class="edit-row">
					<div class="left">
						<%= f.label :notes %><span class="optional">(optional)</span>
						<p>Notes about this Route.</p>
					</div>
					<div class="right">
						<div class="single">
							<%= f.text_field :notes %>
						</div>
					</div>
				</div>
				<div class="edit-row">
					<div class="left">
						<label>Add Stops</label><span class="required">required</span>
						<p>Select the order of the stops in the route.</p>
					</div>
					<div class="right">
						<ol id="stops">
							<%= render :partial => 'stop', :collection => @route.stops %>
						</ol>
						<%= add_stop_link "Add Another Stop", :stops, 'stop', Stop.new %>
					</div>
				</div>
			</div>
			<%= render :partial => 'partials/create_form', :locals => {:f => f} %>
		<% end %>
	</div>
</div>